Add file scoped namespaces support to GetNamespace method#531
Merged
StevenTCramer merged 3 commits intoTimeWarpEngineering:masterfrom Jun 20, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds support for C# 12 file-scoped namespaces to the existing GetNamespace helper.
- Extends the loop condition to recognize
FileScopedNamespaceDeclarationSyntaxnodes. - Updates the return expression to handle both block-scoped and file-scoped namespace syntax.
Comments suppressed due to low confidence (1)
Source/TimeWarp.State.SourceGenerator/ActionSetMethodGenerator.cs:194
- Add a unit test to verify that
GetNamespacereturns the correct name for a file-scoped namespace declaration to ensure this new behavior is covered.
private static string GetNamespace(ClassDeclarationSyntax classDeclaration)
c71695a to
4c787f8
Compare
4c787f8 to
e4695b6
Compare
This change allows using the same ActionSet name under different State names within the same namespace.
Collaborator
|
Sorry I inadvertently merged this thinking it was a different one. Will review and get it in |
Collaborator
|
merged and released 11.0.3 Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.